package io;

import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.charset.StandardCharsets;

public class WriteStringDemo {
    public static void main(String[] args) throws IOException {
        FileOutputStream fis = new FileOutputStream("fos.txt");
        String st = "我带着比身体重的行李。";
        byte [] by = st.getBytes(StandardCharsets.UTF_8);
        fis.write(by);
        fis.close();
        System.out.println("写入完成");
    }
}
